Package pl.wendigo.chrome.protocol.websocket

Contains DevTools protocol WebSocket primitives and utility classes:

  • WebSocketFramesStream represents stream of frames that are exchanged between protocol client and the browser over the WebSocket connection

  • RequestFrame represents frame that is sent over the WebSocket connection

  • ResponseFrame represents different frame types that are received over the WebSocket connection:

    • ErrorResponseFrame represents error frame that is received if the request is malformed and/or invalid

    • RequestResponseFrame represents response frame that is received when request was fulfilled successfully

    • EventResponseFrame represents event frame that is received when Domain event is generated

Types

ErrorResponseFrame
Link copied to clipboard
data class ErrorResponseFrame(id: Long, error: RequestError, sessionId: SessionID?) : WebSocketFrame, ResponseFrame
Represents frame carrying method call error response generated by protocol.
EventResponseFrame
Link copied to clipboard
data class EventResponseFrame(eventName: String, params: JsonElement, sessionId: SessionID?) : WebSocketFrame
Represents frame carrying event generated by protocol.
FrameMapper
Link copied to clipboard
class FrameMapper
FrameMapper is responsible for (de)serializing frames exchanged via Chrome's DevTool Protocol.
RequestError
Link copied to clipboard
data class RequestError(code: Long, message: String, data: String?)
Represents protocol error.
RequestFrame
Link copied to clipboard
data class RequestFrame(id: Long, sessionId: String?, method: String, params: JsonElement?)
Represents request frame.
RequestResponseFrame
Link copied to clipboard
data class RequestResponseFrame(id: Long, result: JsonElement, sessionId: SessionID?) : WebSocketFrame, ResponseFrame
Represents frame carrying method call response generated by protocol.
ResponseFrame
Link copied to clipboard
interface ResponseFrame
Frame that is generated in response to method call.
WebSocketFrame
Link copied to clipboard
sealed class WebSocketFrame
Represents different protocol frame types exchanged over WebSocket connection to the debugger.
WebSocketFramesStream
Link copied to clipboard
class WebSocketFramesStream(webSocketUri: String, framesBufferSize: Int, mapper: FrameMapper, webSocketClient: OkHttpClient) : WebSocketListener, Closeable, AutoCloseable
WebSocketFramesStream represents connection to remote WebSocket endpoint of the DevTools Protocol (either inspectable page debugger url http://localhost:9222/json or browser debugger url http://localhost:9222/json/version)